package com.apex.lottery.service;

import com.apex.lottery.controller.param.DrawPrizeParam;
import com.apex.lottery.controller.param.ShowWinningRecordsParam;
import com.apex.lottery.dao.dataobject.WinningRecordDO;
import com.apex.lottery.service.dto.WinningRecordDTO;
import jakarta.validation.constraints.NotNull;

import java.util.List;

/**
 * @ClassName DrawPrizeService
 * @Description
 * @Author ZJX
 * @Date 2025/4/20 19:07
 * @Version 1.0
 **/
public interface DrawPrizeService {
    /**
     * 异步抽奖接口
     *
     * @param param
     */
    void drawPrize(DrawPrizeParam param);

    /**
     * 校验抽奖请求
     *
     * @param param
     */
    Boolean checkDrawPrizeParam(DrawPrizeParam param);

    /**
     * 保存中奖者名单
     *
     * @param param
     */
    List<WinningRecordDO> saveWinnerRecords(DrawPrizeParam param);


    /**
     * 删除活动/奖品下的中奖记录
     *
     * @param activityId
     * @param prizeId
     */
    void deleteRecords(@NotNull(message = "活动id不能为空") Long activityId, @NotNull(message = "奖品id不能为空") Long prizeId);

    List<WinningRecordDTO> getRecords(ShowWinningRecordsParam param);
}
